<%@page import="pe.com.mowa.siscobsms.bean.persona"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@ page import="pe.com.mowa.siscobsms.datos.*" %>


<%

conPersona cp = new conPersona();
ArrayList personas= cp.getPersonas();

 	
	String query = (String)request.getParameter("q");
	System.out.println("query es "+query);
	//System.out.println("1"+request.getParameterNames().nextElement());
	response.setHeader("Content-Type", "text/html");
	int cnt=1;
	persona per;
    String nomPer;
	for(int i=0;i<personas.size();i++)
	{
 		per=(persona) personas.get(i); 
 		nomPer=per.getId()+" - "+per.getNombre()+" "+per.getApePat()+" "+per.getApeMat();
 		if(nomPer.toUpperCase().contains(query.toUpperCase()))
		{ 
			out.print(nomPer+"\n");
			if(cnt>=10)
				break;
			cnt++;
		}
		
		
		


		
	}
%>